<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
		'id'=>'hash-input-dialog',
		'options'=>array(
			'title'=>'Please input hash of the version',
			'autoOpen'=>false,
			'modal'=>true,
			'buttons'=>array(
				'OK'=>'js:hashAssignment',
				'CANCEL'=>'js:function(){$(this).dialog("close");}'
			),
		),
	)
);

echo '<div><input type="text" id="hash-input" /></div>';

$this->endWidget('zii.widgets.jui.CJuiDialog');
?>
<script>
function hashAssignment()
{
	$(this).dialog("close");
	$.ajax({
			    url: '<?php echo CController::createUrl('manage/deleteVersionWithHash');?>',
			    type: 'post',
			    dataType: 'json',
			    data: {hash:$("#hash-input").val(), guid:guid},
			    success: afterDelete
     		});
    $("#hash-input").val('');
}
</script>